package netty.nio;

import java.nio.ByteBuffer;

/**
 * @author pzy
 * @date 2024/5/31
 */
public class BufferDemo {
    public static void main(String[] args) {
        ByteBuffer buffer = ByteBuffer.allocate(1024);
        buffer.put(new byte[]{1, 2, 3, 4, 5, 6, 7, 8, 9});
        byte[] array = buffer.array();
        System.out.println(array.length);
    }
}
